<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <ul>
    <li>first</li>
    <li>second</li>
    <li>three</li>
    <li>four</li>
    <li>five</li>
  </ul>
  <script>
    const oUl = document.getElementsByTagName('ul')[0]
    oUl.addEventListener('click', function (event) {
      if (event.target.nodeName == 'LI') {
        switch (event.target.innerText) {
          case 'first':
            alert('first')
            break;
          case 'second':
            alert('second')
            break;
          default:
            alert('其他')
            break;
        }
      }
    }, false)
  </script>
</body>

</html>